The present invention relates to the detection of the phase and/or frequency of a signal, such as a received radio signal, relative to a known reference signal, as is more particularly concerned with a method and apparatus providing a digital indication of the detected phase or frequency of the received signal.
The instantaneous phase or the instantaneous frequency of an A.C. electrical signal or pulse train is often preferred to be directly available in digital form when subsequent numerical processing is to take place thereon with the aid of microcomputers or digital signal processing chips, for the purpose of, for example, demodulating a phase or frequency modulated radio signal.
Phase and frequency have a close mathematical relationship such that frequency is the time derivative of phase. If a device is available for digitizing phase, a digital representation of frequency can therefore under certain conditions be obtained by numerical differentiation of the phase using modulo 2Pi (circular) arithmetic subtraction. Alternatively, a frequency digitizing device under certain conditions may be used to generate a digital representation of phase by numerical reintegration using modulo 2Pi (circular) arithmetic addition. In both cases, success depends on an accurate mapping of the circular phase domain onto a circular digital domain or Galois field of the same 2Pi period. For example, if an 8-bit binary word is chosen to represent phase, the number range 0 to 256 must exactly match the phase range 0 to 2Pi radians so that the phase wrap-around over 2Pi is exactly represented by the wrap-around of the 8-bit binary word back to 0 upon incrementing 255 by 1.
A conventional method to digitize the phase of an A.C. electrical signal is to apply the signal first to a phase comparator along with a reference signal, the phase comparator thus producing an output voltage or current proportional to the phase difference between its inputs. This analog measure of the signal phase may then be applied to an analog-to-digital converter in order to generate the desired numerical value in the form of a digital code.
The above-mentioned method has certain drawbacks, apart from the need for analog circuit components. If the phase-to-voltage conversion factor of the phase comparator does not exactly match the voltage-to-code conversion factor of the A-to-D converter, an error occurs in the mapping of one circular domain to the other, which can become magnified in subsequent numerical processing such as differentiation.
A similarly conventional method of digitizing frequency by means of an analog frequency discriminator followed by an A-to-D converter suffers from a similar drawback. When the frequency is re-integrated to obtain phase, the results diverge from the true phase due to practical tolerances in the matching of the discriminator to the A-to-D converter.
When the input signal contains a significant amount of noise, there are a limited number of phase comparator circuits with a 2Pi range which function correctly. For example, it is not desirable to use a phase comparator which averages the phase of the signal over many cycles, as, in the region of the 0/360 degrees discontinuity where successive phases may alternate due to noise between just over 0 and just less than 360 degrees, such a circuit can produce completely wrong average result of 180 degrees. In order to solve this problem of averaging a circular quantity such as phase, its instantaneous value is required. Circular averaging may then be employed, which involves taking the sine and cosine of the phase angles, averaging those separately, and then computing the arctangent of the result.
An alternative solution to the modulo 2Pi problem for noisy signals is to use two phase comparators with their reference inputs offset by 90 degrees so that at least one of them lies far from the ambiguous region. A type of phase comparator is often chosen which produces an output voltage proportional to the sine of the phase difference between its inputs, the two quadrature comparator outputs then being a measure of the sine and cosine of phase angle, respectively. These signals are suitable directly for circular averaging. Then, after separate digitization of the averaged sine and cosine signals, the desired phase number may be obtained by a numerical arctangent operation. This so-called I,Q (In-phase and Quadrature) method, is quite complex, as it requires a number of analog components, two A-to-D conversions and a numerical arctangent operation.
A known method to produce a value representing the instantaneous frequency of a signal using purely digital logic elements is the so-called counter-discriminator method. This method entails directly counting the number of zero-crossings (or cycles) of the input signal which occur in a given time. After reading out the previous result, the digital counter is reset to zero and then proceeds again to count zero-crossing events of the input signal for a fixed time to produce the next number.
The problem associated with the counter-discriminator is the long count time needed to determine the frequency with precision. For example, if 1% measurement accuracy is required, the count time must span around 100 zero-crossings of the input signal. The rate at which new frequency measurements can then be generated is limited to around 1/100 of the signal frequency. Moreover, fluctuations of the signal frequency within the measurement period will not be seen.
The drawback associated with the digital counter-discriminator is partly due to the need to limit the timing resolution to whole cycles of the input signal. If fractional cycle resolution could be obtained, a given measurement accuracy can be reached in a shorter time. In digital period measurement, the duration of one or more whole cycles of the signal is measured by counting cycles of a much higher frequency clock, thus providing fractional cycle accuracy. The reciprocal of the period is a measure of the frequency.
In digital period measurement, occurrence of a signal zero-crossing causes the previous count to be read out of the counter before resetting it to zero. It then counts again until the next zero-crossing, at which point the new period measurement is read out, and so on.
The drawbacks associated with digital period measurement are the need for the reciprocal operation, and the fact that the period for which the measurement applies is not regular, but determined by the signal itself. This operation is referred to as natural sampling. It is more often desired to sample and digitize the signal at regular sampling intervals that are not a function of the possibly noisy or varying signal.